package com.cloudbroker.bcs.platform.ltb.bizapi.constants.type;

/**
 * Created by fangyf18371 on 2016/12/8.
 * 推荐方式--组合推荐
 */
public enum RecommendRrderType {
    EARNINGS("0","按累计收益推荐"),
    SENTIMENT("7","按组合人气推荐"),
    CUSTOM("5","组合推荐自定义");

    private final String val;

    private final String description;

    private String toString;

    RecommendRrderType(String val, String description) {
        this.val = val;
        this.description = description;
    }

    public String getVal() {
        return val;
    }

    public String getDescription() {
        return description;
    }

    public static RecommendRrderType getByValue(String val) {
        if (val==null||val.equals("")){
            return null;
        }
        for(RecommendRrderType type : values()) {
            if( type.getVal().equals(val) ) {
                return type;
            }
        }
        return null;
    }
    @Override
    public String toString() {
        return "RecommendRrderType{" +
                "val='" + val + '\'' +
                ", description='" + description + '\'' +
                ", toString='" + toString + '\'' +
                '}';
    }


}

